cc.Class({
    extends: cc.Component,

    properties: {
        sidePrefab: {default: null,type: cc.Prefab},
        sideBtn: {default: null,type: cc.Node}
    },

    onLoad(){
        console.log('start load');

        if (cc.sys.platform!=cc.sys.BYTEDANCE_GAME) {
            this.sideBtn.active=false
        }
        else{
            this.sideBtn.active=true
        }
    },
    onClick(){
        console.log('点击打开侧边栏')
        let side = cc.instantiate(this.sidePrefab);
        side.parent = this.node;
        side.active = true;
    }

});
